﻿#region Using Directives

    using System;

    using Csla;

#endregion

namespace MarketPulse.Reporting.Core.Criteria
{
    /// <summary>
    /// Criteria class specifying a ClientGUID, VisitID and the corrosponding VisitVersionID.
    /// </summary>
    [Serializable]
    public class ClientGUIDAndVisitIDAndVisitVersionIDCriteria : CriteriaBase<ClientGUIDAndVisitIDAndVisitVersionIDCriteria>
    {

        #region Constructors

        /// <summary>
        /// Default constructor for this class
        /// </summary>
        /// <param name="clientGUID">The ClientGUID to associate with this criteria</param>                      
        /// <param name="visitID">The VisitID to associate with this criteria</param>                      
        /// <param name="visitVersionID">The VisitVersionID to associate with this criteria</param>                      
        public ClientGUIDAndVisitIDAndVisitVersionIDCriteria(Guid clientGUID, long visitID, int visitVersionID)
        {
            ClientGUID = clientGUID;
            VisitID = visitID;
            VisitVersionID = visitVersionID;
        }

        #endregion

        #region Properties

            /// <summary>
            /// The ClientGUID for this criteria object.
            /// </summary>
            public static PropertyInfo<Guid> ClientGUIDProperty = RegisterProperty<Guid>(p => p.ClientGUID);
            /// <summary>
            /// The ClientGUID for this criteria object.
            /// </summary>
            public Guid ClientGUID
            {
                get { return ReadProperty(ClientGUIDProperty); }
                private set { LoadProperty(ClientGUIDProperty, value); }
            }

            /// <summary>
            /// The VisitID for this criteria object.
            /// </summary>
            public static PropertyInfo<long> VisitIDProperty = RegisterProperty<long>(p => p.VisitID);
            /// <summary>
            /// The VisitID for this criteria object.
            /// </summary>
            public long VisitID
            {
                get { return ReadProperty(VisitIDProperty); }
                private set { LoadProperty(VisitIDProperty, value); }
            }

            /// <summary>
            /// The VisitVersionID for this criteria object.
            /// </summary>
            public static PropertyInfo<int> VisitVersionIDProperty = RegisterProperty<int>(p => p.VisitVersionID);
            /// <summary>
            /// The VisitVersionID for this criteria object.
            /// </summary>
            public int VisitVersionID
            {
                get { return ReadProperty(VisitVersionIDProperty); }
                private set { LoadProperty(VisitVersionIDProperty, value); }
            }

        #endregion

    }
}
